using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class WireNameMap : EntityTypeConfiguration<WireName>
    {
        public WireNameMap()
        {
            // Primary Key
            this.HasKey(t => t.WN_ID);

            // Properties
            this.Property(t => t.WN_Name)
                .HasMaxLength(50);

            this.Property(t => t.HospitalId)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("WireName");
            this.Property(t => t.WN_ID).HasColumnName("WN_ID");
            this.Property(t => t.WN_Name).HasColumnName("WN_Name");
            this.Property(t => t.HospitalId).HasColumnName("HospitalId");
            this.Property(t => t.drop_state).HasColumnName("drop_state");
        }
    }
}
